package com.ruoyi.project.drug.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.drug.domain.DrugBatch;
import com.ruoyi.project.drug.service.IDrugBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/drug/batch")
public class DrugBatchController extends BaseController {
    @Autowired
    private IDrugBatchService iDrugBatchService;
    @PreAuthorize("@ss.hasPermi('drug:batch:list')")
    @GetMapping("/list")
    public TableDataInfo list(DrugBatch drugBatch)
    {
        startPage();
        List<DrugBatch> list = iDrugBatchService.selectDrugBatchList(drugBatch);
        return getDataTable(list);
    }
}
